import { configureStore, combineReducers } from "@reduxjs/toolkit"
import isCollapsed from "./modules/collapsed.slice"
import isLoading from "./modules//loading.slice"
// import { persistStore, persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER } from 'redux-persist'
// import storage from 'redux-persist/lib/storage' // defaults to localStorage for web
const { composeWithDevTools } = require('redux-devtools-extension');
const reducer = combineReducers({
    isCollapsed,
    isLoading
})
const store = configureStore({
    devTools: process.env.NODE_ENV !== "production",
    // 合并状态切片
    reducer
}, composeWithDevTools())
export default store
// import { legacy_createStore as createStore, combineReducers } from 'redux'
// import Collapsed from "./modules/collapsed"
// const { composeWithDevTools } = require('redux-devtools-extension');
// const reducer = combineReducers({
//     Collapsed
// })
// const store = createStore(reducer, composeWithDevTools())
// export default store
